package com.quanyan.stadium.service.gameEvent;

import com.quanyan.stadium.api.req.gameEventConfig.ReqClubCreateGameEvent;
import com.quanyan.stadium.api.req.v2.ReqClubGameEvent;
import com.quanyan.stadium.api.req.v3.ReqGameRoundV2;
import com.quanyan.stadium.api.resp.RespGameEventDetail;
import com.quanyan.stadium.api.resp.v2.*;
import com.quanyan.stadium.entity.TbGameEvent;
import com.quanyan.stadium.entity.vo.ClubGameEventConfig;
import com.quanyan.stadium.entity.vo.GameEvent;

import java.lang.reflect.InvocationTargetException;
import java.util.List;

/**
 * Created by xiaoxiao on 16/10/9.
 *
 * 俱乐部赛事的创建
 */
public interface ClubGameEventConfigService {

    /**
     * 俱乐部赛事的创建
     *
     * */
    GameEvent createGameEvent(ReqClubCreateGameEvent reqClubCreateGameEvent, int uid) throws Exception;


    /**
     * 俱乐部赛事详情展示
     *
     * @param
     *
     * */
    RespGameEventDetail gameEventDetail(Integer gameEventId, Integer uid) throws InvocationTargetException, IllegalAccessException;


    /**
     * 校验该俱乐部是否已经授权
     *
     * @param
     *
     * */
    boolean isClubAuth(Integer clubId);

    /**
     * 点击下一轮编排
     * */
    List<RespGameSchedule> openNextGameRoundV2(Integer gameEventId, Integer gameRoundId, Integer uid) throws Exception;

    /**
     *  详情页
     *
     **/
    RespClubGameDetail clubGameEventDetailV2(Integer gameEventId, Integer uid);

    /**
     *  排行榜
     *
     **/
    List<RankGameTeam> clubGameEventRankList(Integer gameEventId, Integer uid);

    /**
     *  赛事取消
     *
     **/
    void cancelClubGameEvent(Integer gameEventId, Integer uid);

    /**
     * 用户栏目对应的俱乐部信息
     *
     * */
    RespUserGameTypeAndClub userClubMsgAndGameType(Integer uid);

    /**
     * 生成对战表 (内部赛-----混合赛生成对战表)
     *
     * */
    void generateRoundAndSchedule(TbGameEvent tbGameEvent, boolean isDouble, Integer uid, ReqGameRoundV2 gameRoundV2) throws Exception;


    /**
     * 获取当前报名人数列表
     *
     * */
    RespGameMember queryRespGameMember(Integer gameEventId, Integer uid);


    /**
     * 获取内部赛配置信息
     * @return
     */
    ClubGameEventConfig getClubGameEventConfig(Integer uid);

    /**
     * 查询内部赛列表
     * @param reqClubGameEvent
     * @return
     */
    List<GameEvent> queryClubGameEventList(ReqClubGameEvent reqClubGameEvent);

    /**
     * 查询用户的内部赛
     * @param reqClubGameEvent
     * @return
     */
    List<GameEvent> queryUidClubGameEventList(ReqClubGameEvent reqClubGameEvent);
}
